package foo.bar.wiki.domain;

import foo.bar.wiki.security.RoleType;

import java.util.ArrayList;
import java.io.Serializable;

/**
 * @author tmjee
 * @version $Date$ $Id$
 */
public class AnonymousUser extends User implements Serializable {

    public static final User INSTANCE = new AnonymousUser();

    private AnonymousUser() {
        {
                final Role role = new Role();
                role.setType(RoleType.ANONYMOUS);

                setDisabled(false);
                setEmail("anonymous@email.com");
                setExpiryDate(null);
                setLocked(false);
                setPassword("password");
                setPermissions(new ArrayList<Permission>());
                setProperties(new ArrayList<Property>());
                setRoles(new ArrayList<Role>(){{add(role);}});
                setUsername("anonymous");
            }    
    }
}
